﻿<?xml version="1.0" encoding="utf-8" ?>

<platform namespace="http://metalx.org/Usb/Ohci/Registers" xmlns="http://metalx.org/Platform">
	<constants>
		<constant name="Revision" value="00">
			The revision of the hardware controller.

			Reserved									24 bits
			Revision									8 bits
		</constant>
		<constant name="Control" value="04">
			Reserved									21 bits
			RemoteWakeupEnabled				1 bit
			RemoteWakeupSupported			1 bit
			InterruptRouting							1 bit		(0:Host, 1:SMBios)
			FuctionalState							2 bits	(0:Reset, 1:Resume, 2:Operational, 3:Suspend)
			BulkListEnable							1 bit
			ControlListEnable						1 bit
			IsochronousEnable						1 bit
			PeriodicListEnable						1 bit
			ControlToBulkRatio						2 bits
		</constant>
		<constant name="CommandStatus" value="08">
			Reserved									14 bits
			SchedulingOverrunCount			2 bits
			Reserved									12 bits
			OwnershipChangeRequest			1 bit
			BulkListFilled								1 bit
			ControlListFilled							1 bit
			Reset										1 bit
		</constant>
		<constant name="InterruptStatus" value="0c">
			Reserved									1 bit
			OwnershipChange						1 bit
			Reserved									23 bits
			RootHubStatusChanged				1 bit
			FrameNumberOverflow				1 bit
			UnrecoverableError					1 bit
			ResumeDetected						1 bit
			StartOfFrameSent						1 bit
			WriteDoneHead							1 bit
			SchedulingOverrun						1 bit
	</constant>
		<constant name="InterruptEnable" value="10">
			MasterInterruptEnable				1 bit
			OwnershipChanged					1 bit
			Reserved									23 bits
			RootHubStatusChanged				1 bit
			FrameNumberOverflow				1 bit
			UnrecoverableError					1 bit
			ResumeDetect							1 bit
			StartOfFrame								1 bit
			WriteDoneHead							1 bit
			ScheduleOverrun						1 bit
		</constant>
		<constant name="InterruptDisable" value="14">
			MasterInterruptDisable				1 bit
			OwnershipChanged					1 bit
			Reserved									23 bits
			RootHubStatusChanged				1 bit
			FrameNumberOverflow				1 bit
			UnrecoverableError					1 bit
			ResumeDetect							1 bit
			StartOfFrame								1 bit
			WriteDoneHead							1 bit
			ScheduleOverrun						1 bit
		</constant>
		<constant name="CommunicationArea" value="18">
			The address of the communication area.
		</constant>
		<constant name="CurrentPeriodicEndpointDescriptorAddress" value="1c">
			The address of the current periodic enpoint.
		</constant>
		<constant name="HeadControlEndpointDescriptorAddress" value="20">
			The address of the first entry in the control endpoint descriptor list.
		</constant>
		<constant name="CurrentControlEndpointDescriptorAddress" value="24">
			The address of the current control endpoint descriptor.
		</constant>
		<constant name="HeadBulkEndpointDescriptorAddress" value="28">
			The address of the first bulk endpoint descriptor.
		</constant>
		<constant name="CurrentBulkEndpointDescriptorAddress" value="2c">
			The address of the current bulk endpoint descriptor.
		</constant>
		<constant name="HeadDoneTransferDescriptorAddress" value="30">
			The address of the first done endpoint descriptor.
		</constant>
		<constant name="FrameInterval" value="34">
			Toggle				1 bit
			MaxPacketSize	15 bits
			Reserved			2 bits
			FrameInterval		14 bits
		</constant>
		<constant name="FrameTimeRemaining" value="38">
			SynchronizeToggle			1 bits
			Reserved						17 bits
			FrameTimeRemaining		14 bits
		</constant>
		<constant name="FrameNumber" value="3c">
			Reserved			16 bits
			FrameNumber	16 bits
		</constant>
		<constant name="PeriodicStartTime" value="40">
			Reserved			18 bits
			StartTime			14 bits
		</constant>
		<constant name="LowSpeedThreshold" value="44">
			Reserved			21 bits
			Threshold			11 bits
		</constant>
		<constant name="RootHubDescriptorA" value="48">
			GoodPowerTime						8 bits	// 2ms Intervals
			Reserved									11 bits
			OvercurrentNotSupported			1 bit
			PortOverpowerProtection			1 bit
			CompoundDevice						1 bit
			PortSwitchingSupported				1 bit
			PowerSwitchingSupported			1 bit
			PortCount									8 bits
		</constant>
		<constant name="RootHubDescriptorB" value="4c">
			PortGlobalPower[1..15]				15 bits
			Reserved									1 bit
			PortNotRemovable[1..15]			15 bits
			Reserved									1 bit
		</constant>
		<constant name="RootHubStatus" value="50">
			RemoteWakeupDisable				1 bit
			GlobalOvercurrentIndicator			1 bit
			SetGlobalPower							1 bit
			RemoteWakeupEnabled				1 bit
			Reserved									13 bits
			GlobalOvercurrent						1 bit
			ClearGlobalPower						1 bit
		</constant>
		<constant name="RootHubPortStatus" value="54">
			The status of each port on the root hub [1..15].
			
			Reserved									11 bits
			PortResetChanged						1 bit
			PortOvercurrentChanged			1 bit
			PortSuspendedChanged				1 bit
			PortEnabledChanged					1 bit
			DeviceConnectedChanged			1 bit
			Reserved									6 bits
			LowSpeedDeviceAttached			1 bit
			PortPower									1 bit
			Reserved									3 bits
			PortReset									1 bit
			PortOvercurrentIndicator			1 bit
			PortSuspended							1 bit
			PortEnabled								1 bit
			DeviceConnected						1 bit
		</constant>
	</constants>
</platform>